package com.mec.beans.y2013.headfirstservlet;

import java.util.ArrayList;
import java.util.List;

/**
 * ref: Head first Sevlets and JSP 2nd Edition, pg 82(116/913)
 * 
 * @author MEC
 * @since 2013-03-27
 */
public class BeerExpert {
	public static BeerExpert getInstance(){
		return instance;
	}
	
	private BeerExpert(){
	}
	
	public List<String> getBrands(String color){
		if (null == color || color.isEmpty()){
			return null;
		}
		
		List<String> brands = new ArrayList<String>();
		if (color.equals("amber")){
			brands.add("Jack Amber");
			brands.add("Red Moose");
		}else{
			brands.add("Jail Pale Ale");
			brands.add("Gout Stout");
		}
		return brands;
	}
	
	private static BeerExpert instance = new BeerExpert();

}
